#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>

int main()
{
  pid_t pid;
  for(int i = 0;i < 5;i++)
  {
    sleep(i+1);
    pid = fork();
    if(pid > 0)
    {
      break;
    }
    printf("my pid is %d,my father pid %d\n",getpid(),getppid());
  }
  return 0;
}
